package com.onlyMe.view.world.components.base
{
	import com.qb9.flashlib.tasks.ITask;
	
	/**
	 * @author ariel
	 */
	public class UpdateableIsleComponentView extends BaseIsleComponentView implements ITask
	{
		private var _elapsed:uint = 0;
		private var _running:Boolean = false;
		
		public function UpdateableIsleComponentView()
		{
		}
		
		public function get running():Boolean { return _running; }
		
		public function get elapsed():uint { return _elapsed; }
		
		public function start():void { _running = true; }
		
		public function stop():void { _running = false;	}
		
		public function update(milliseconds:uint):void { _elapsed += milliseconds; }
		
		public function clone():ITask
		{
			throw new Error('Components cannot be cloned');
			// return this;
		}
		
		public function dispose():void
		{
			// if (!isDestroyed)
			// 	destroy();
		}
	}
}
